﻿using HardcoreGame.Common.CustomSets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;

namespace HardcoreGame.Content.Items.Weapons.Ranged.Slingshot
{
    public class CopperSlingshoot : ModItem
    {
        public override void SetStaticDefaults()
        {
            CustomItemSets.Slingshoot[Type] = true;
        }
        public override void SetDefaults()
        {
            Item.DefaultToRangedWeapon(1, ModContent.ItemType<Ammo.SlingBullets.StoneSlingBullet>(), 22, 7.5f, true);
            Item.damage = 7;
            Item.width = Item.height = 26;
            Item.useStyle = ItemUseStyleID.Shoot;
            Item.knockBack = 1.5f;
            Item.value = 200;
            Item.rare = ItemRarityID.White;
            Item item = Item;
            SoundStyle item2 = SoundID.Item5;
            item.UseSound = new SoundStyle?(item2.WithPitchOffset(0.2f));
        }
        public override Vector2? HoldoutOffset()
        {
            return new Vector2?(new Vector2(-2f, -2f));
        }
        public override void AddRecipes()
        {
            Recipe modRecipe = Recipe.Create(Type, 1);
            modRecipe.AddIngredient(ItemID.CopperBar, 10);
            modRecipe.AddTile(TileID.Anvils);
            modRecipe.Register();
        }
    }
}
